import 'package:get/get.dart';
import 'package:share_fit/app/helper/ext/tr_ext.dart';
import 'package:share_fit/app/models/home/edit_widget_item.dart';
import 'package:share_fit/app/routes/home_routes.dart';
import 'package:share_fit/generated/locales.g.dart';

class EditWidgetState {
  List<EditWidgetItem> sourceList = [];
  List<EditWidgetItem> hasList = [];
  List<EditWidgetItem> backupHasList = [];

  //手指覆盖的地方，即item被拖动时 底部的那个widget是否可见
  RxBool showItemWhenCovered = false.obs;

  EditWidgetState() {
    ///Initialize variables
    // sourceList.add(
    //   EditWidgetItem(
    //       type: Type.exerciseRecords,
    //       title: LocaleKeys.widgets_exercise.ts,
    //       image: 'assets/images/home/exercise_record.png',
    //       route: '/home/exercise/records'),
    // );
    sourceList.add(
      EditWidgetItem(
          type: Type.heartRate,
          title: LocaleKeys.widgets_heart_rate.ts,
          image: 'assets/images/home/heart.png',
          route: '/home/heartRate/records'),
    );
    sourceList.add(
      EditWidgetItem(
          type: Type.sleep,
          title: LocaleKeys.widgets_sleep.ts,
          image: 'assets/images/home/sleep.png',
          route: '/home/sleep/records'),
    );
    // sourceList.add(
    //   EditWidgetItem(
    //       type: Type.bloodPressure,
    //       title: LocaleKeys.widgets_blood_pressure.ts,
    //       image: 'assets/images/home/blood_pressure.png',
    //       route: '/home/bloodPressure/records'
    //   ),
    // );
    sourceList.add(
      EditWidgetItem(
          type: Type.bloodOxygen,
          title: LocaleKeys.widgets_blood_oxygen.ts,
          image: 'assets/images/home/spo2.png',
          route: '/home/spo2/records'),
    );
    // sourceList.add(
    //   EditWidgetItem(
    //       type: Type.bodyTemperature,
    //       title: LocaleKeys.widgets_body_temperature.ts,
    //       image: 'assets/images/home/body_temperature.png',
    //       route: '/home/bodyTemperature/records'
    //   ),
    // );
    sourceList.add(
      EditWidgetItem(
          type: Type.cycleCalendar,
          title: LocaleKeys.widgets_cycle_calendar.ts,
          image: 'assets/images/home/menstrual.png',
          route: HomeRoutes.cycleCalendarPage
      ),
    );
    sourceList.add(
      EditWidgetItem(
          type: Type.stress,
          title: LocaleKeys.widgets_stress.ts,
          image: 'assets/images/home/stress.png',
          route: '/home/stress/records'
      ),
    );
    // sourceList.add(
    //   EditWidgetItem(
    //       type: Type.fatigue,
    //       title: LocaleKeys.widgets_fatigue.ts,
    //       image: 'assets/images/home/fatigue.png',
    //       route: '/home/fatigue/records'
    //   ),
    // );
    // sourceList.add(
    //   EditWidgetItem(
    //       type: Type.bloodGlucose,
    //       title: LocaleKeys.widgets_blood_glucose.ts,
    //       image: 'assets/images/home/blood_glucose.png',
    //       route: '/home/bloodGlucose/records'
    //   ),
    // );
    // sourceList.add(
    //   EditWidgetItem(
    //       type: Type.met,
    //       title: LocaleKeys.widgets_met.ts,
    //       image: 'assets/images/home/met.png',
    //       route: '/home/met/records'
    //   ),
    // );
  }
}
